<?php include '../templates/hibiscus/common/header.html';?>
<div class="layui-container fly-marginTop fly-user-main">
    <div class="layui-row">
		<!-- 公告-->
		<?php if(isset($config['notice']) AND $config['notice']):?>
		<blockquote class="layui-elem-quote layui-text" style="background-color: #ffffff;">
			<i class="layui-icon layui-icon-speaker"></i><?php echo $config['notice'];?>
		</blockquote>
		<?php endif;?>
        <div class="layui-card layui-form-pane">
		
            <div class="layui-card-header layui-hide-xs">"<?php echo $products_type['name'];?>"分类下的商品</div>
			<div class="layui-tab-brief layui-hide-md"><ul class="layui-tab-title"><li class="layui-this">购买商品</li><li class=""><a href="/product/query">查询订单</a></li></ul></div>
			
            <div class="layui-card-body" id="prodcut_num">
				<table class="layui-table" id="table" lay-filter="table"></table>
			</div>
		</div>
    </div>
</div>
<script type="text/html" id="name">
    <a href="/product/{{d.id}}.html">{{d.name}}</a>
</script>
<script type="text/html" id="auto">
    {{# if(d.auto >0){ }}
    <span class="layui-badge layui-bg-green">自动发货</span>
    {{# } else { }}
    <span class="layui-badge layui-bg-gray">手工发货</span>
    {{# } }}
</script>
<script type="text/html" id="qty">
    {{# if(d.stockcontrol >0){ }}
        {{d.qty}}
    {{# } else { }}
        <span class="layui-badge layui-bg-gray">不限量</span>
    {{# } }}
</script>
<script type="text/html" id="opt">
	{{# if(d.stockcontrol >0 && d.qty=="0"){ }}
	<a class="layui-btn layui-btn-xs layui-btn-disabled" href="javascript:;">购买</a>
	{{# } else { }}
    <a class="layui-btn layui-btn-warm layui-btn-xs" href="/product/{{d.id}}.html">购买</a>
	{{# } }}
</script>
<!--引入公共底文件-->
<?php include '../templates/hibiscus/common/footer.html';?>
<script>
layui.use('product-list');
var TID = "<?php echo $products_type['id'];?>";
var PASSWORD_GROUP = 1;
</script>